#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
#include <string>

using namespace std;

int main()
{
    string s;
    cin >> s;
    int begin = 0;
    int len = 0;

    for (int i = 0; i < s.size(); i++)
    {
        if (s[i] >= '0' && s[i] <= '9')
        {
            int j = i;
            while (j < s.size() && s[j] >= '0' && s[j] <= '9') j++;
            if (j - i > len)
            {
                begin = i;
                len = j - i;
            }
            i = j;
        }
    }
    for (int i = 0; i <= len; i++)
    {
        cout << s[i+begin];
    }

    return 0;
}